<!--  -->
<template>
  <div class="swipe">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in banners" :key="item.id">
        <img :src="item.image_url" alt="">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { defineComponent,toRefs } from 'vue'
export default defineComponent({
  name: 'HomeSwipe',
  props: {
    banners: {
      type: Array,
      default() {
        return []
      }
    }
  },
  setup() {
    
    return {
      // banners
    }
  }
})
</script>

<style lang="scss" scoped>
.my-swipe {
    width: 100%;
    height: 400px;
    
  }
  .van-swipe-item {
    width: 100%;
    height: 100%;
    
  }
  img {
    width: 100%;
    height: 100%;
  }
</style>